import plugin from '../../lib/plugins/plugin.js'
import fetch from "node-fetch"
import { getGroupImageUrl, segment } from "oicq";
import { parseFunString } from 'oicq/lib/common.js';
import axios from'../../node_modules/axios/lib/axios.js'

//作者：橙子 1258716469
//首发群：蒙德幼稚园 134086404
//第一次弄这种插件，写的很烂，请各位大佬轻点喷！！！ 如果有报错什么的，可以自己尝试修复，代码很简单。（其实我只是复制粘贴罢了）

 let qq1
 let qq2
 let permittee
 let companion

export class example extends plugin {
  constructor () {
    super({
      /** 功能名称 */
      name: 'DJ表情插件',
      /** 功能描述 */
      dsc: '表情制作',

      event: 'message',
      /** 优先级，数字越小等级越高 */
      priority: 5000,
      rule: [
        


 {
          /** 命令正则匹配 */
          reg: '^#阿尼亚(.*)$',
          /** 执行方法 */
          fnc: 'any'
        }, 
        {
          /** 命令正则匹配 */
          reg: '^#黑化(.*)$',
          /** 执行方法 */
          fnc: 'hh'
        },
        {
          /** 命令正则匹配 */
          reg: '^#举牌(.*)$',
          /** 执行方法 */
          fnc: 'jp'
        },
        {
          /** 命令正则匹配 */
          reg: '^#诺基亚(.*)$',
          /** 执行方法 */
          fnc: 'njy'
        },
        {
          /** 命令正则匹配 */
          reg: '^#结婚证(.*)$',
          /** 执行方法 */
          fnc: 'jhz'
        },
        {
          /** 命令正则匹配 */
          reg: '^#拿来吧你(.*)$',
          /** 执行方法 */
          fnc: 'nlbn'
        },
        {
          /** 命令正则匹配 */
          reg: '^#颜值过高(.*)$',
          /** 执行方法 */
          fnc: 'yzgg'
        },
        {
          /** 命令正则匹配 */
          reg: '^#纳西妲抱(.*)$',
          /** 执行方法 */
          fnc: 'nxdb'
        },
        {
          /** 命令正则匹配 */
          reg: '^#基友证(.*)$',
          /** 执行方法 */
          fnc: 'jyz'
        },
        {
          /** 命令正则匹配 */
          reg: '^#高富帅证(.*)$',
          /** 执行方法 */
          fnc: 'gfsz'
        },
        {
          /** 命令正则匹配 */
          reg: '^#白富美证(.*)$',
          /** 执行方法 */
          fnc: 'bfmz'
        },
        {
          /** 命令正则匹配 */
          reg: '^#订婚证(.*)$',
          /** 执行方法 */
          fnc: 'dhz'
        },
        {
          /** 命令正则匹配 */
          reg: '^#世界首富证(.*)$',
          /** 执行方法 */
          fnc: 'sjsfz'
        },
        {
          /** 命令正则匹配 */
          reg: '^#屌丝证(.*)$',
          /** 执行方法 */
          fnc: 'dsz'
        },
        {
          /** 命令正则匹配 */
          reg: '^#老司机证(.*)$',
          /** 执行方法 */
          fnc: 'lsjz'
        },
        {
          /** 命令正则匹配 */
          reg: '^#光棍证(.*)$',
          /** 执行方法 */
          fnc: 'ggz'
        },
        {
          /** 命令正则匹配 */
          reg: '^#想(.*)$',
          /** 执行方法 */
          fnc: 'xiang'
        },
        {
          /** 命令正则匹配 */
          reg: '^#想1(.*)$',
          /** 执行方法 */
          fnc: 'xiang1'
        },
        {
          /** 命令正则匹配 */
          reg: '^#想2(.*)$',
          /** 执行方法 */
          fnc: 'xiang2'
        },
        {
          /** 命令正则匹配 */
          reg: '^#想要钱(.*)$',
          /** 执行方法 */
          fnc: 'xyq'
        },
        {
          /** 命令正则匹配 */
          reg: '^#偷瞄(.*)$',
          /** 执行方法 */
          fnc: 'tm'
        },
        {
          /** 命令正则匹配 */
          reg: '^#比心(.*)$',
          /** 执行方法 */
          fnc: 'bx'
        },
        {
          /** 命令正则匹配 */
          reg: '^#勾引(.*)$',
          /** 执行方法 */
          fnc: 'gy'
        },
        {
          /** 命令正则匹配 */
          reg: '^#鄙视(.*)$',
          /** 执行方法 */
          fnc: 'bishi'
        },
        {
          /** 命令正则匹配 */
          reg: '^#OK(.*)$',
          /** 执行方法 */
          fnc: 'okk'
        },
        {
          /** 命令正则匹配 */
          reg: '^#敲(.*)$',
          /** 执行方法 */
          fnc: 'qiao'
        },
        {
          /** 命令正则匹配 */
          reg: '^#我要这个(.*)$',
          /** 执行方法 */
          fnc: 'wy'
        },
        {
          /** 命令正则匹配 */
          reg: '^#求婚(.*)$',
          /** 执行方法 */
          fnc: 'qh'
        },
        {
          /** 命令正则匹配 */
          reg: '^#群最帅(.*)$',
          /** 执行方法 */
          fnc: 'qzs'
        },
        {
          /** 命令正则匹配 */
          reg: '^#心碎(.*)$',
          /** 执行方法 */
          fnc: 'xinsui'
        },
        {
          /** 命令正则匹配 */
          reg: '^#单身狗(.*)$',
          /** 执行方法 */
          fnc: 'dsg'
        },
        {
          /** 命令正则匹配 */
          reg: '^#洗衣机(.*)$',
          /** 执行方法 */
          fnc: 'xyj'
        },
        {
          /** 命令正则匹配 */
          reg: '^#群宣言(.*)$',
          /** 执行方法 */
          fnc: 'qxy'
        },
        {
          /** 命令正则匹配 */
          reg: '^#为什么@我(.*)$',
          /** 执行方法 */
          fnc: 'wsmatw'
        },
        {
          /** 命令正则匹配 */
          reg: '^#出警(.*)$',
          /** 执行方法 */
          fnc: 'chujing'
        },
        {
          /** 命令正则匹配 */
          reg: '^#捅(.*)$',
          /** 执行方法 */
          fnc: 'tong'
        },
        {
          /** 命令正则匹配 */
          reg: '^#我儿子(.*)$',
          /** 执行方法 */
          fnc: 'erzi'
        },
        {
          /** 命令正则匹配 */
          reg: '^#奠(.*)$',
          /** 执行方法 */
          fnc: 'dian'
        },
        {
          /** 命令正则匹配 */
          reg: '^#我女儿(.*)$',
          /** 执行方法 */
          fnc: 'nver'
        },
        {
          /** 命令正则匹配 */
          reg: '^#草原(.*)$',
          /** 执行方法 */
          fnc: 'caoyuan'
        },
        {
          /** 命令正则匹配 */
          reg: '^#收下(.*)$',
          /** 执行方法 */
          fnc: 'shouxia'
        },
        {
          /** 命令正则匹配 */
          reg: '^#拒绝(.*)$',
          /** 执行方法 */
          fnc: 'jujue'
        },
        {
          /** 命令正则匹配 */
          reg: '^#给你看(.*)$',
          /** 执行方法 */
          fnc: 'gnk'
        },
        {
          /** 命令正则匹配 */
          reg: '^#玩游戏(.*)$',
          /** 执行方法 */
          fnc: 'wyx'
        },
        {
          /** 命令正则匹配 */
          reg: '^#问号(.*)$',
          /** 执行方法 */
          fnc: 'wenhao'
        },
        {
          /** 命令正则匹配 */
          reg: '^#什么东西(.*)$',
          /** 执行方法 */
          fnc: 'smdx'
        },
        {
          /** 命令正则匹配 */
          reg: '^#哭(.*)$',
          /** 执行方法 */
          fnc: 'ku'
        },
        {
          /** 命令正则匹配 */
          reg: '^#撕(.*)$',
          /** 执行方法 */
          fnc: 'si'
        },
        {
          /** 命令正则匹配 */
          reg: '^#楼上傻子(.*)$',
          /** 执行方法 */
          fnc: 'lssz'
        },
        {
          /** 命令正则匹配 */
          reg: '^#可达鸭(.*)$',
          /** 执行方法 */
          fnc: 'kdy'
        }
      ]
    })
  }


      async any (e){
        if(!/\d/.test(e.msg)) {let targetQQ = e.at;let url ='http://xiaobapi.top/api/xb/api/any.php?qq='+targetQQ;
       console.log(url)
       await this.reply(segment.image(url),true)
             }
             else{console.log('1')
             qq2 = e.msg.replace('#阿尼亚','')
             let url ='http://xiaobapi.top/api/xb/api/any.php?qq='+qq2;
           console.log(url)
           e.reply(segment.image(url),true)
               console.log(qq2)}
            }
      async nlbn (e){
        if(!/\d/.test(e.msg)) {let targetQQ = e.at;let url ='https://xiaobapi.top/api/xb/api/give_me_that.php?qq='+targetQQ;
       console.log(url)
       await this.reply(segment.image(url),true)
             }
             else{console.log('1')
             qq2 = e.msg.replace('#拿来吧你','')
             let url ='https://xiaobapi.top/api/xb/api/give_me_that.php?qq='+qq2;
           console.log(url)
           e.reply(segment.image(url),true)
               console.log(qq2)}
            }
      async yzgg (e){
        if(!/\d/.test(e.msg)) {let targetQQ = e.at;let url ='https://xiaobapi.top/api/xb/api/error.php?qq='+targetQQ;
       console.log(url)
       await this.reply(segment.image(url),true)
             }
             else{console.log('1')
             qq2 = e.msg.replace('#颜值过高','')
             let url ='https://xiaobapi.top/api/xb/api/error.php?qq='+qq2;
           console.log(url)
           e.reply(segment.image(url),true)
               console.log(qq2)}
            }
      async nxdb (e){
        if(!/\d/.test(e.msg)) {let targetQQ = e.at;let url ='https://xiaobapi.top/api/xb/api/naxidabao.php?qq='+targetQQ;
       console.log(url)
       await this.reply(segment.image(url),true)
             }
             else{console.log('1')
             qq2 = e.msg.replace('#纳西妲抱','')
             let url ='https://xiaobapi.top/api/xb/api/naxidabao.php?qq='+qq2;
           console.log(url)
           e.reply(segment.image(url),true)
               console.log(qq2)}
            }
      async jyz (e){
        if(!/\d/.test(e.msg)) {let targetQQ = e.at;let url ='https://xiaobapi.top/api/xb/api/stickers_certificate.php?qq='+targetQQ;
       console.log(url)
       await this.reply(segment.image(url),true)
             }
             else{console.log('1')
             qq2 = e.msg.replace('#基友证','')
             let url ='https://xiaobapi.top/api/xb/api/stickers_certificate.php?qq='+qq2;
           console.log(url)
           e.reply(segment.image(url),true)
               console.log(qq2)}
            }
      async gfsz (e){
        if(!/\d/.test(e.msg)) {let targetQQ = e.at;let url ='https://xiaobapi.top/api/xb/api/stickers_certificate_2.php?qq='+targetQQ;
       console.log(url)
       await this.reply(segment.image(url),true)
             }
             else{console.log('1')
             qq2 = e.msg.replace('#高富帅证','')
             let url ='https://xiaobapi.top/api/xb/api/stickers_certificate_2.php?qq='+qq2;
           console.log(url)
           e.reply(segment.image(url),true)
               console.log(qq2)}
            }
      async bfmz (e){
        if(!/\d/.test(e.msg)) {let targetQQ = e.at;let url ='https://xiaobapi.top/api/xb/api/stickers_certificate_3.php?qq='+targetQQ;
       console.log(url)
       await this.reply(segment.image(url),true)
             }
             else{console.log('1')
             qq2 = e.msg.replace('#白富美证','')
             let url ='https://xiaobapi.top/api/xb/api/stickers_certificate_3.php?qq='+qq2;
           console.log(url)
           e.reply(segment.image(url),true)
               console.log(qq2)}
            }
      async dhz (e){
        if(!/\d/.test(e.msg)) {let targetQQ = e.at;let url ='https://xiaobapi.top/api/xb/api/stickers_certificate_4.php?qq='+targetQQ;
       console.log(url)
       await this.reply(segment.image(url),true)
             }
             else{console.log('1')
             qq2 = e.msg.replace('#订婚证','')
             let url ='https://xiaobapi.top/api/xb/api/stickers_certificate_4.php?qq='+qq2;
           console.log(url)
           e.reply(segment.image(url),true)
               console.log(qq2)}
            }
      async sjsfz (e){
        if(!/\d/.test(e.msg)) {let targetQQ = e.at;let url ='https://xiaobapi.top/api/xb/api/stickers_certificate_5.php?qq='+targetQQ;
       console.log(url)
       await this.reply(segment.image(url),true)
             }
             else{console.log('1')
             qq2 = e.msg.replace('#世界首富证','')
             let url ='https://xiaobapi.top/api/xb/api/stickers_certificate_5.php?qq='+qq2;
           console.log(url)
           e.reply(segment.image(url),true)
               console.log(qq2)}
            }
      async dsz (e){
        if(!/\d/.test(e.msg)) {let targetQQ = e.at;let url ='https://xiaobapi.top/api/xb/api/stickers_certificate_8.php?qq='+targetQQ;
       console.log(url)
       await this.reply(segment.image(url),true)
             }
             else{console.log('1')
             qq2 = e.msg.replace('#屌丝证','')
             let url ='https://xiaobapi.top/api/xb/api/stickers_certificate_8.php?qq='+qq2;
           console.log(url)
           e.reply(segment.image(url),true)
               console.log(qq2)}
            }
      async lsjz (e){
        if(!/\d/.test(e.msg)) {let targetQQ = e.at;let url ='https://xiaobapi.top/api/xb/api/stickers_certificate_10.php?qq='+targetQQ;
       console.log(url)
       await this.reply(segment.image(url),true)
             }
             else{console.log('1')
             qq2 = e.msg.replace('#老司机证','')
             let url ='https://xiaobapi.top/api/xb/api/stickers_certificate_10.php?qq='+qq2;
           console.log(url)
           e.reply(segment.image(url),true)
               console.log(qq2)}
            }
      async ggz (e){
        if(!/\d/.test(e.msg)) {let targetQQ = e.at;let url ='https://xiaobapi.top/api/xb/api/stickers_certificate_11.php?qq='+targetQQ;
       console.log(url)
       await this.reply(segment.image(url),true)
             }
             else{console.log('1')
             qq2 = e.msg.replace('#光棍证','')
             let url ='https://xiaobapi.top/api/xb/api/stickers_certificate_11.php?qq='+qq2;
           console.log(url)
           e.reply(segment.image(url),true)
               console.log(qq2)}
            }
      async xiang (e){
        if(!/\d/.test(e.msg)) {let targetQQ = e.at;let url ='https://xiaobapi.top/api/xb/api/xiang_4.php?qq='+targetQQ;
       console.log(url)
       await this.reply(segment.image(url),true)
             }
             else{console.log('1')
             qq2 = e.msg.replace('#想','')
             let url ='https://xiaobapi.top/api/xb/api/xiang_4.php?qq='+qq2;
           console.log(url)
           e.reply(segment.image(url),true)
               console.log(qq2)}
            }
      async xiang1 (e){
        if(!/\d/.test(e.msg)) {let targetQQ = e.at;let url ='https://xiaobapi.top/api/xb/api/xiang_5.php?qq='+targetQQ;
       console.log(url)
       await this.reply(segment.image(url),true)
             }
             else{console.log('1')
             qq2 = e.msg.replace('#想1','')
             let url ='https://xiaobapi.top/api/xb/api/xiang_5.php?qq='+qq2;
           console.log(url)
           e.reply(segment.image(url),true)
               console.log(qq2)}
            }
      async xyq (e){
        if(!/\d/.test(e.msg)) {let targetQQ = e.at;let url ='https://xiaobapi.top/api/xb/api/want_get_money.php?qq='+targetQQ;
       console.log(url)
       await this.reply(segment.image(url),true)
             }
             else{console.log('1')
             qq2 = e.msg.replace('#想要钱','')
             let url ='https://xiaobapi.top/api/xb/api/want_get_money.php?qq='+qq2;
           console.log(url)
           e.reply(segment.image(url),true)
               console.log(qq2)}
            }
      async tm (e){
        if(!/\d/.test(e.msg)) {let targetQQ = e.at;let url ='https://xiaobapi.top/api/xb/api/toumiao.php?qq='+targetQQ;
       console.log(url)
       await this.reply(segment.image(url),true)
             }
             else{console.log('1')
             qq2 = e.msg.replace('#偷瞄','')
             let url ='https://xiaobapi.top/api/xb/api/toumiao.php?qq='+qq2;
           console.log(url)
           e.reply(segment.image(url),true)
               console.log(qq2)}
            }
      async bx (e){
        if(!/\d/.test(e.msg)) {let targetQQ = e.at;let url ='https://xiaobapi.top/api/xb/api/bixinxin.php?qq='+targetQQ;
       console.log(url)
       await this.reply(segment.image(url),true)
             }
             else{console.log('1')
             qq2 = e.msg.replace('#比心','')
             let url ='https://xiaobapi.top/api/xb/api/bixinxin.php?qq='+qq2;
           console.log(url)
           e.reply(segment.image(url),true)
               console.log(qq2)}
            }
      async gy (e){
        if(!/\d/.test(e.msg)) {let targetQQ = e.at;let url ='https://xiaobapi.top/api/xb/api/gouyin.php?qq='+targetQQ;
       console.log(url)
       await this.reply(segment.image(url),true)
             }
             else{console.log('1')
             qq2 = e.msg.replace('#勾引','')
             let url ='https://xiaobapi.top/api/xb/api/gouyin.php?qq='+qq2;
           console.log(url)
           e.reply(segment.image(url),true)
               console.log(qq2)}
            }
      async bishi (e){
        if(!/\d/.test(e.msg)) {let targetQQ = e.at;let url ='https://xiaobapi.top/api/xb/api/bishi.php?qq='+targetQQ;
       console.log(url)
       await this.reply(segment.image(url),true)
             }
             else{console.log('1')
             qq2 = e.msg.replace('#鄙视','')
             let url ='https://xiaobapi.top/api/xb/api/bishi.php?qq='+qq2;
           console.log(url)
           e.reply(segment.image(url),true)
               console.log(qq2)}
            }
      async okk (e){
        if(!/\d/.test(e.msg)) {let targetQQ = e.at;let url ='https://xiaobapi.top/api/xb/api/okk.php?qq='+targetQQ;
       console.log(url)
       await this.reply(segment.image(url),true)
             }
             else{console.log('1')
             qq2 = e.msg.replace('#OK','')
             let url ='https://xiaobapi.top/api/xb/api/okk.php?qq='+qq2;
           console.log(url)
           e.reply(segment.image(url),true)
               console.log(qq2)}
            }
      async qiao (e){
        if(!/\d/.test(e.msg)) {let targetQQ = e.at;let url ='https://xiaobapi.top/api/xb/api/qiao.php?qq='+targetQQ;
       console.log(url)
       await this.reply(segment.image(url),true)
             }
             else{console.log('1')
             qq2 = e.msg.replace('#敲','')
             let url ='https://xiaobapi.top/api/xb/api/qiao.php?qq='+qq2;
           console.log(url)
           e.reply(segment.image(url),true)
               console.log(qq2)}
            }
      async wy (e){
        if(!/\d/.test(e.msg)) {let targetQQ = e.at;let url ='https://xiaobapi.top/api/xb/api/this.php?qq='+targetQQ;
       console.log(url)
       await this.reply(segment.image(url),true)
             }
             else{console.log('1')
             qq2 = e.msg.replace('#我要这个','')
             let url ='https://xiaobapi.top/api/xb/api/this.php?qq='+qq2;
           console.log(url)
           e.reply(segment.image(url),true)
               console.log(qq2)}
            }
      async qh (e){
        if(!/\d/.test(e.msg)) {let targetQQ = e.at;let url ='https://xiaobapi.top/api/xb/api/qiuhun.php?qq='+targetQQ;
       console.log(url)
       await this.reply(segment.image(url),true)
             }
             else{console.log('1')
             qq2 = e.msg.replace('#求婚','')
             let url ='https://xiaobapi.top/api/xb/api/qiuhun.php?qq='+qq2;
           console.log(url)
           e.reply(segment.image(url),true)
               console.log(qq2)}
            }
      async qzs (e){
        if(!/\d/.test(e.msg)) {let targetQQ = e.at;let url ='https://xiaobapi.top/api/xb/api/zuishuai.php?qq='+targetQQ;
       console.log(url)
       await this.reply(segment.image(url),true)
             }
             else{console.log('1')
             qq2 = e.msg.replace('#群最帅','')
             let url ='https://xiaobapi.top/api/xb/api/zuishuai.php?qq='+qq2;
           console.log(url)
           e.reply(segment.image(url),true)
               console.log(qq2)}
            }
      async xinsui (e){
        if(!/\d/.test(e.msg)) {let targetQQ = e.at;let url ='https://xiaobapi.top/api/xb/api/xinsuisui.php?qq='+targetQQ;
       console.log(url)
       await this.reply(segment.image(url),true)
             }
             else{console.log('1')
             qq2 = e.msg.replace('#心碎','')
             let url ='https://xiaobapi.top/api/xb/api/xinsuisui.php?qq='+qq2;
           console.log(url)
           e.reply(segment.image(url),true)
               console.log(qq2)}
            }
      async dsg (e){
        if(!/\d/.test(e.msg)) {let targetQQ = e.at;let url ='https://xiaobapi.top/api/xb/api/single_idcard.php?qq='+targetQQ;
       console.log(url)
       await this.reply(segment.image(url),true)
             }
             else{console.log('1')
             qq2 = e.msg.replace('#单身狗','')
             let url ='https://xiaobapi.top/api/xb/api/single_idcard.php?qq='+qq2;
           console.log(url)
           e.reply(segment.image(url),true)
               console.log(qq2)}
            }
      async xyj (e){
        if(!/\d/.test(e.msg)) {let targetQQ = e.at;let url ='https://xiaobapi.top/api/xb/api/xiyiji.php?qq='+targetQQ;
       console.log(url)
       await this.reply(segment.image(url),true)
             }
             else{console.log('1')
             qq2 = e.msg.replace('#洗衣机','')
             let url ='https://xiaobapi.top/api/xb/api/xiyiji.php?qq='+qq2;
           console.log(url)
           e.reply(segment.image(url),true)
               console.log(qq2)}
            }
      async qxy (e){
        if(!/\d/.test(e.msg)) {let targetQQ = e.at;let url ='https://xiaobapi.top/api/xb/api/xuanshi.php?qq='+targetQQ;
       console.log(url)
       await this.reply(segment.image(url),true)
             }
             else{console.log('1')
             qq2 = e.msg.replace('#群宣言','')
             let url ='https://xiaobapi.top/api/xb/api/xuanshi.php?qq='+qq2;
           console.log(url)
           e.reply(segment.image(url),true)
               console.log(qq2)}
            }
      async xyj (e){
        if(!/\d/.test(e.msg)) {let targetQQ = e.at;let url ='https://xiaobapi.top/api/xb/api/xiyiji.php?qq='+targetQQ;
       console.log(url)
       await this.reply(segment.image(url),true)
             }
             else{console.log('1')
             qq2 = e.msg.replace('#洗衣机','')
             let url ='https://xiaobapi.top/api/xb/api/xiyiji.php?qq='+qq2;
           console.log(url)
           e.reply(segment.image(url),true)
               console.log(qq2)}
            }
      async wsmatw (e){
        if(!/\d/.test(e.msg)) {let targetQQ = e.at;let url ='https://xiaobapi.top/api/xb/api/whyatme.php?qq='+targetQQ;
       console.log(url)
       await this.reply(segment.image(url),true)
             }
             else{console.log('1')
             qq2 = e.msg.replace('#为什么@我','')
             let url ='https://xiaobapi.top/api/xb/api/whyatme.php?qq='+qq2;
           console.log(url)
           e.reply(segment.image(url),true)
               console.log(qq2)}
            }
      async chujing (e){
        if(!/\d/.test(e.msg)) {let targetQQ = e.at;let url ='https://xiaobapi.top/api/xb/api/police2.php?qq='+targetQQ;
       console.log(url)
       await this.reply(segment.image(url),true)
             }
             else{console.log('1')
             qq2 = e.msg.replace('#出警','')
             let url ='https://xiaobapi.top/api/xb/api/police2.php?qq='+qq2;
           console.log(url)
           e.reply(segment.image(url),true)
               console.log(qq2)}
            }
      async kdy (e){
        if(!/\d/.test(e.msg)) {let targetQQ = e.at;let url ='https://xiaobapi.top/api/xb/api/cover_face_2.php?qq='+targetQQ;
       console.log(url)
       await this.reply(segment.image(url),true)
             }
             else{console.log('1')
             qq2 = e.msg.replace('#可达鸭','')
             let url ='https://xiaobapi.top/api/xb/api/cover_face_2.php?qq='+qq2;
           console.log(url)
           e.reply(segment.image(url),true)
               console.log(qq2)}
            }
      async erzi (e){
        if(!/\d/.test(e.msg)) {let targetQQ = e.at;let url ='https://xiaobapi.top/api/xb/api/bqb_2.php?qq='+targetQQ;
       console.log(url)
       await this.reply(segment.image(url),true)
             }
             else{console.log('1')
             qq2 = e.msg.replace('#我儿子','')
             let url ='https://xiaobapi.top/api/xb/api/bqb_2.php?qq='+qq2;
           console.log(url)
           e.reply(segment.image(url),true)
               console.log(qq2)}
            }
      async dian (e){
        if(!/\d/.test(e.msg)) {let targetQQ = e.at;let url ='https://xiaobapi.top/api/xb/api/ji.php?qq='+targetQQ;
       console.log(url)
       await this.reply(segment.image(url),true)
             }
             else{console.log('1')
             qq2 = e.msg.replace('#奠','')
             let url ='https://xiaobapi.top/api/xb/api/ji.php?qq='+qq2;
           console.log(url)
           e.reply(segment.image(url),true)
               console.log(qq2)}
            }
      async nver (e){
        if(!/\d/.test(e.msg)) {let targetQQ = e.at;let url ='https://xiaobapi.top/api/xb/api/bqb_6.php?qq='+targetQQ;
       console.log(url)
       await this.reply(segment.image(url),true)
             }
             else{console.log('1')
             qq2 = e.msg.replace('#我女儿','')
             let url ='https://xiaobapi.top/api/xb/api/bqb_6.php?qq='+qq2;
           console.log(url)
           e.reply(segment.image(url),true)
               console.log(qq2)}
            }
      async caoyuan (e){
        if(!/\d/.test(e.msg)) {let targetQQ = e.at;let url ='https://xiaobapi.top/api/xb/api/bqb_4.php?qq='+targetQQ;
       console.log(url)
       await this.reply(segment.image(url),true)
             }
             else{console.log('1')
             qq2 = e.msg.replace('#草原','')
             let url ='https://xiaobapi.top/api/xb/api/bqb_4.php?qq='+qq2;
           console.log(url)
           e.reply(segment.image(url),true)
               console.log(qq2)}
            }
      async shouxia (e){
        if(!/\d/.test(e.msg)) {let targetQQ = e.at;let url ='https://xiaobapi.top/api/xb/api/bqb_1.php?qq='+targetQQ;
       console.log(url)
       await this.reply(segment.image(url),true)
             }
             else{console.log('1')
             qq2 = e.msg.replace('#收下','')
             let url ='https://xiaobapi.top/api/xb/api/bqb_1.php?qq='+qq2;
           console.log(url)
           e.reply(segment.image(url),true)
               console.log(qq2)}
            }
      async jujue (e){
        if(!/\d/.test(e.msg)) {let targetQQ = e.at;let url ='https://xiaobapi.top/api/xb/api/bqb_3.php?qq='+targetQQ;
       console.log(url)
       await this.reply(segment.image(url),true)
             }
             else{console.log('1')
             qq2 = e.msg.replace('#拒绝','')
             let url ='https://xiaobapi.top/api/xb/api/bqb_3.php?qq='+qq2;
           console.log(url)
           e.reply(segment.image(url),true)
               console.log(qq2)}
            }
      async gnk (e){
        if(!/\d/.test(e.msg)) {let targetQQ = e.at;let url ='https://xiaobapi.top/api/xb/api/play_game.php?qq='+targetQQ;
       console.log(url)
       await this.reply(segment.image(url),true)
             }
             else{console.log('1')
             qq2 = e.msg.replace('#给你看','')
             let url ='https://xiaobapi.top/api/xb/api/play_game.php?qq='+qq2;
           console.log(url)
           e.reply(segment.image(url),true)
               console.log(qq2)}
            }
      async wyx (e){
        if(!/\d/.test(e.msg)) {let targetQQ = e.at;let url ='https://xiaobapi.top/api/xb/api/play_game_2.php?qq='+targetQQ;
       console.log(url)
       await this.reply(segment.image(url),true)
             }
             else{console.log('1')
             qq2 = e.msg.replace('#玩游戏','')
             let url ='https://xiaobapi.top/api/xb/api/play_game_2.php?qq='+qq2;
           console.log(url)
           e.reply(segment.image(url),true)
               console.log(qq2)}
            }
      async wenhao (e){
        if(!/\d/.test(e.msg)) {let targetQQ = e.at;let url ='https://xiaobapi.top/api/xb/api/wenhao.php?qq='+targetQQ;
       console.log(url)
       await this.reply(segment.image(url),true)
             }
             else{console.log('1')
             qq2 = e.msg.replace('#问号','')
             let url ='https://xiaobapi.top/api/xb/api/wenhao.php?qq='+qq2;
           console.log(url)
           e.reply(segment.image(url),true)
               console.log(qq2)}
            }
      async smdx (e){
        if(!/\d/.test(e.msg)) {let targetQQ = e.at;let url ='https://xiaobapi.top/api/xb/api/peng.php?qq='+targetQQ;
       console.log(url)
       await this.reply(segment.image(url),true)
             }
             else{console.log('1')
             qq2 = e.msg.replace('#什么东西','')
             let url ='https://xiaobapi.top/api/xb/api/peng.php?qq='+qq2;
           console.log(url)
           e.reply(segment.image(url),true)
               console.log(qq2)}
            }
      async ku (e){
        if(!/\d/.test(e.msg)) {let targetQQ = e.at;let url ='https://xiaobapi.top/api/xb/api/ku.php?qq='+targetQQ;
       console.log(url)
       await this.reply(segment.image(url),true)
             }
             else{console.log('1')
             qq2 = e.msg.replace('#哭','')
             let url ='https://xiaobapi.top/api/xb/api/ku.php?qq='+qq2;
           console.log(url)
           e.reply(segment.image(url),true)
               console.log(qq2)}
            }
      async hh (e){
        if(!/\d/.test(e.msg)) {let targetQQ = e.at;let url ='https://xiaobapi.top/api/xb/api/bqb_10.php?qq='+targetQQ;
       console.log(url)
       await this.reply(segment.image(url),true)
             }
             else{console.log('1')
             qq2 = e.msg.replace('#黑化','')
             let url ='https://xiaobapi.top/api/xb/api/bqb_10.php?qq='+qq2;
           console.log(url)
           e.reply(segment.image(url),true)
               console.log(qq2)}
            }
      async si (e){
        if(!/\d/.test(e.msg)) {let targetQQ = e.at;let url ='https://xiaobapi.top/api/xb/api/si.php?qq='+targetQQ;
       console.log(url)
       await this.reply(segment.image(url),true)
             }
             else{console.log('1')
             qq2 = e.msg.replace('#撕','')
             let url ='https://xiaobapi.top/api/xb/api/si.php?qq='+qq2;
           console.log(url)
           e.reply(segment.image(url),true)
               console.log(qq2)}
            }
       async xiang2 (e){
        if(!/\d/.test(e.msg)){let targetQQ = e.at;let url ='https://xiaobapi.top/api/xb/api/xiang_6.php?qq='+targetQQ
             console.log(url)
             await this.reply(segment.image(url),true)
                   }else{console.log('1')
                   qq2 = e.msg.replace('#想2','')
                   let url ='https://xiaobapi.top/api/xb/api/xiang_6.php?qq='+qq2;
                 console.log(url)
                 e.reply(segment.image(url),true)
                     console.log(qq2)}}
     
             async xz (e){
              let msg = e.msg.replace('#星座运势 ','');
              let url ='http://xiaobapi.top/api/xb/api/xingzuo.php?msg='+msg;
             console.log(url)
             let res = await fetch(url)
             res = await res.text()
             console.log(res)
             await this.reply(res,true)
           
                   }
                   async jp (e){
                    let msg = e.msg.replace('#举牌','');
                    if(msg.length>4){await this.reply('输入长度不可大于4个字符'),true}else{
                    let url ='http://xiaobapi.top/api/xb/api/fans_jupai.php?msg='+msg;
                    let URL =encodeURI(url)
                    console.log(URL)
                    await this.reply(segment.image(URL),true)}}
                   async lssz (e){
                    let msg = e.msg.replace('#楼上傻子','');
                    if(msg.length>4){await this.reply('输入长度不可大于4个字符'),true}else{
                    let url ='https://xiaobapi.top/api/xb/api/gif.php?name='+msg;
                    let URL =encodeURI(url)
                    console.log(URL)
                    await this.reply(segment.image(URL),true)}}
                    async njy (e){
                      let msg = e.msg.replace('#诺基亚','');
//判断msg的字数
if (msg.length >= 10 || msg.length >= 20 || msg.length >= 30 || msg.length >= 40) {
  let newMsg = '';
  for (let i = 0; i < msg.length; i++) {
    if (i % 10 === 0) {
      newMsg += '\n';
    }
    newMsg += msg[i];
  }
  msg = newMsg;
}
// 执行下一条命令
                      let url ='https://xiaobapi.top/api/xb/api/nokia.php?msg='+msg;
                      let URL =encodeURI(url)
                      console.log(URL)
                      await this.reply(segment.image(URL),true)}

async kd (e){
  if(!/\d/.test(e.msg)){ qq2 = e.at; qq1 = e.user_id
    let url ='http://xiaobapi.top/api/xb/api/qian.php?qq='+qq1+'&qq2='+qq2;
    console.log(url)
    e.reply(segment.image(url),true)
    console.log(qq1+' '+qq2) }
                      else
              
                       {console.log('1')
                       qq1 = e.user_id
                       qq2 = e.msg.replace('#牵','')
                       let url ='http://xiaobapi.top/api/xb/api/qian.php?qq='+qq1+'&qq2='+String(qq2);
                     console.log(url)
                     e.reply(segment.image(url),true)
                         console.log(qq1+' '+qq2) }
                      
                      
                        }
async tong (e){
  if(!/\d/.test(e.msg)){ qq2 = e.at; qq1 = e.user_id
    let url ='https://xiaobapi.top/api/xb/api/tong.php?qq='+qq1+'&qq2='+qq2;
    console.log(url)
    e.reply(segment.image(url),true)
    console.log(qq1+' '+qq2) }
                      else
              
                       {console.log('1')
                       qq1 = e.user_id
                       qq2 = e.msg.replace('#捅','')
                       let url ='https://xiaobapi.top/api/xb/api/tong.php?qq='+qq1+'&qq2='+String(qq2);
                     console.log(url)
                     e.reply(segment.image(url),true)
                         console.log(qq1+' '+qq2) }
                      
                      
                        }
async jhz (e){
  if(!/\d/.test(e.msg)){ qq2 = e.at; qq1 = e.user_id;permittee = e.user_id; companion = e.at
    let url ='https://xiaobapi.top/api/xb/api/jiehun.php?qq='+qq1+'&qq2='+qq2+'&permittee='+permittee+'&companion='+companion;
    console.log(url)
    e.reply(segment.image(url),true)
    console.log(qq1+' '+qq2+' '+permittee+' '+companion) }
                      else
              
                       {console.log('1')
                       qq1 = e.user_id
                       permittee = e.message[1].text.replace("@", "")
                       companion = e.message[1].text.replace("@", "")
                       qq2 = e.msg.replace('#结婚证','')
                       let url ='https://xiaobapi.top/api/xb/api/jiehun.php?qq='+qq1+'&qq2='+'&permittee='+permittee+'&companion='+companion;
                     console.log(url)
                     e.reply(segment.image(url),true)
                         console.log(qq1+' '+qq2) }
                      
                      
                        }
     } 
                  
                  
                        
                  
                  
                  
                  
                  
                  
                  